<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>css处理文字溢出方式 | 个人笔记</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../CSS/CSS5.html" />
    
    
    <link rel="prev" href="../CSS/CSS3.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="2.4"
        data-chapter-title="css处理文字溢出方式"
        data-filepath="CSS/CSS4.md"
        data-basepath=".."
        data-revision="Fri Oct 19 2018 22:35:09 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="HTML/HTML1.html">
            
                
                    <a href="../HTML/HTML1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        HTML
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="HTML/HTML2.html">
            
                
                    <a href="../HTML/HTML2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        HTML元素分类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="HTML/HTML3.html">
            
                
                    <a href="../HTML/HTML3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        HTML图片路径设置
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="HTML/HTML4.html">
            
                
                    <a href="../HTML/HTML4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        HTML表格
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="HTML/HTML5.html">
            
                
                    <a href="../HTML/HTML5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        HTML实体字符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="HTML/HTML6.html">
            
                
                    <a href="../HTML/HTML6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        HTML列表
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="HTML/HTML7.html">
            
                
                    <a href="../HTML/HTML7.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        HTML常见的元素
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="HTML/HTML8.html">
            
                
                    <a href="../HTML/HTML8.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        HTML新增及删除的元素
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="CSS/CSS.html">
            
                
                    <a href="../CSS/CSS.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        CSS
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="CSS/CSS1.html">
            
                
                    <a href="../CSS/CSS1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        css引入方式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="CSS/CSS2.html">
            
                
                    <a href="../CSS/CSS2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        css表格
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="CSS/CSS3.html">
            
                
                    <a href="../CSS/CSS3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        css元素盒子模型及元素类型
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="2.4" data-path="CSS/CSS4.html">
            
                
                    <a href="../CSS/CSS4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        css处理文字溢出方式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="CSS/CSS5.html">
            
                
                    <a href="../CSS/CSS5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        css伪类选择符及命名方式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="CSS/CSS6.html">
            
                
                    <a href="../CSS/CSS6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        css选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="CSS/CSS7.html">
            
                
                    <a href="../CSS/CSS7.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        css清除浮动
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="mobile/mb.html">
            
                
                    <a href="../mobile/mb.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        Mobile
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="mobile/mb1.html">
            
                
                    <a href="../mobile/mb1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        Mobile rem布局
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="mobile/mb2.html">
            
                
                    <a href="../mobile/mb2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        Mobile 权重值
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="mobile/mb3.html">
            
                
                    <a href="../mobile/mb3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        Mobile 栅格化布局
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="js/js.html">
            
                
                    <a href="../js/js.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        js
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="js/js2.html">
            
                
                    <a href="../js/js2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        JavaScript 数据类型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="js/js3.html">
            
                
                    <a href="../js/js3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        JavaScript 数据类型2
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="js/js4.html">
            
                
                    <a href="../js/js4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        JavaScript 数据类型转换
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="js/js5.html">
            
                
                    <a href="../js/js5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.</b>
                        
                        JavaScript 运算符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="js/js6.html">
            
                
                    <a href="../js/js6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.</b>
                        
                        JavaScript 运算符2
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.6" data-path="js/js7.html">
            
                
                    <a href="../js/js7.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.6.</b>
                        
                        JavaScript 运算符3
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.7" data-path="js/js8.html">
            
                
                    <a href="../js/js8.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.7.</b>
                        
                        JavaScript 运算符4
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.8" data-path="js/js9.html">
            
                
                    <a href="../js/js9.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.8.</b>
                        
                        JavaScript 条件语句和循环语句
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="vue/vue.html">
            
                
                    <a href="../vue/vue.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        vue
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="vue/vue2.html">
            
                
                    <a href="../vue/vue2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        vue指令
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="vue/vue3.html">
            
                
                    <a href="../vue/vue3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        vue绑定class和style
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="vue/vue4.html">
            
                
                    <a href="../vue/vue4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.</b>
                        
                        vue条件渲染
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="vue/vue5.html">
            
                
                    <a href="../vue/vue5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.4.</b>
                        
                        vue绑定表单
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.5" data-path="vue/vue6.html">
            
                
                    <a href="../vue/vue6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.5.</b>
                        
                        vue路由
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.6" data-path="vue/vue7.html">
            
                
                    <a href="../vue/vue7.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.6.</b>
                        
                        vue-cli3脚手架安装
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.7" data-path="vue/vue8.html">
            
                
                    <a href="../vue/vue8.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.7.</b>
                        
                        vue组件之间的通讯
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" data-path="smallpro/sp.html">
            
                
                    <a href="../smallpro/sp.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        smallpro
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7" data-path="other/oth.html">
            
                
                    <a href="../other/oth.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.</b>
                        
                        其余重点
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="7.1" data-path="other/oth2.html">
            
                
                    <a href="../other/oth2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.1.</b>
                        
                        什么叫跨域
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.2" data-path="other/oth3.html">
            
                
                    <a href="../other/oth3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.2.</b>
                        
                        vue生命周期
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.3" data-path="other/oth4.html">
            
                
                    <a href="../other/oth4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.3.</b>
                        
                        vue事件绑定
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.4" data-path="other/oth5.html">
            
                
                    <a href="../other/oth5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.4.</b>
                        
                        原型链
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.5" data-path="other/oth6.html">
            
                
                    <a href="../other/oth6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.5.</b>
                        
                        箭头函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.6" data-path="other/oth7.html">
            
                
                    <a href="../other/oth7.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.6.</b>
                        
                        vue和vuex的区别
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.7" data-path="other/oth8.html">
            
                
                    <a href="../other/oth8.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.7.</b>
                        
                        js的继承方式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.8" data-path="other/oth9.html">
            
                
                    <a href="../other/oth9.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.8.</b>
                        
                        一次完整的HTTP事务
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.9" data-path="other/oth10.html">
            
                
                    <a href="../other/oth10.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.9.</b>
                        
                        var和let声明变量的区别
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.10" data-path="other/oth11.html">
            
                
                    <a href="../other/oth11.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.10.</b>
                        
                        浏览器兼容问题
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.11" data-path="other/oth12.html">
            
                
                    <a href="../other/oth12.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.11.</b>
                        
                        JS 事件绑定、事件监听、事件委托
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.12" data-path="other/oth13.html">
            
                
                    <a href="../other/oth13.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.12.</b>
                        
                        数据类型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.13" data-path="other/oth14.html">
            
                
                    <a href="../other/oth14.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.13.</b>
                        
                        jq封装Ajax
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.14" data-path="other/oth15.html">
            
                
                    <a href="../other/oth15.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.14.</b>
                        
                        设置元素垂直居中或文字居中的方式
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="8" data-path="Interview/In.html">
            
                
                    <a href="../Interview/In.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.</b>
                        
                        面试题库
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="8.1" data-path="Interview/In2.html">
            
                
                    <a href="../Interview/In2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.1.</b>
                        
                        面试题库
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >个人笔记</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h3 id="css&#x5904;&#x7406;&#x6587;&#x5B57;&#x6EA2;&#x51FA;&#x65B9;&#x5F0F;">css&#x5904;&#x7406;&#x6587;&#x5B57;&#x6EA2;&#x51FA;&#x65B9;&#x5F0F;</h3>
<pre><code>/*&#x591A;&#x884C;&#x6587;&#x5B57;&#x6EA2;&#x51FA;&#x5904;&#x7406;&#x65B9;&#x6CD5;*/
</code></pre><pre><code class="lang-css">    <span class="hljs-rule"><span class="hljs-attribute">overflow</span>:<span class="hljs-value"> hidden</span></span>; <span class="hljs-comment">/*&#x8D85;&#x51FA;&#x90E8;&#x5206;*/</span>
    <span class="hljs-rule"><span class="hljs-attribute">-webkit-line-clamp</span>:<span class="hljs-value"> <span class="hljs-number">5</span></span></span>; <span class="hljs-comment">/*&#x5B9A;&#x4E49;&#x6587;&#x672C;&#x663E;&#x793A;&#x7684;&#x884C;&#x6570;*/</span>
    <span class="hljs-rule"><span class="hljs-attribute">display</span>:<span class="hljs-value"> -webkit-box</span></span>; <span class="hljs-comment">/*&#x7528;&#x6765;&#x517C;&#x5BB9;webkit&#x5185;&#x6838;&#x7684;&#x6D4F;&#x89C8;&#x5668;*/</span>
    <span class="hljs-rule"><span class="hljs-attribute">-webkit-box-orient</span>:<span class="hljs-value"> vertical</span></span>; <span class="hljs-comment">/*&#x628A;&#x8D85;&#x51FA;&#x90E8;&#x5206;&#x7528;...&#x663E;&#x793A;*/</span>
</code></pre>
<pre><code>/*&#x4E00;&#x884C;&#x6587;&#x5B57;&#x6EA2;&#x51FA;&#x5904;&#x7406;*/
</code></pre><pre><code class="lang-css">    <span class="hljs-class">.test</span><span class="hljs-rules">{
        <span class="hljs-rule"><span class="hljs-attribute">width</span>:<span class="hljs-value"> <span class="hljs-number">220px</span></span></span>;
        <span class="hljs-rule"><span class="hljs-attribute">border</span>:<span class="hljs-value"> <span class="hljs-number">2px</span> solid black</span></span>;
        <span class="hljs-rule"><span class="hljs-attribute">overflow</span>:<span class="hljs-value"> hidden</span></span>;
        <span class="hljs-rule"><span class="hljs-attribute">white-space</span>:<span class="hljs-value"> nowrap</span></span>; <span class="hljs-comment">/*&#x5F3A;&#x5236;&#x6587;&#x5B57;&#x4E00;&#x884C;&#x663E;&#x793A;*/</span>
        <span class="hljs-rule"><span class="hljs-attribute">text-overflow</span>:<span class="hljs-value"> ellipsis</span></span>;<span class="hljs-comment">/*&#x628A;&#x8D85;&#x51FA;&#x90E8;&#x5206;&#x7528;...&#x663E;&#x793A;*/</span>
    }</span>
</code></pre>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../CSS/CSS3.html" class="navigation navigation-prev " aria-label="Previous page: css元素盒子模型及元素类型"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../CSS/CSS5.html" class="navigation navigation-next " aria-label="Next page: css伪类选择符及命名方式"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"expandable-chapters":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
